package com.xy.servicemanage.action;

import java.util.Set;

public class LockTimeoutThread implements Runnable {
	@Override
	public void run() {
		while (true) {
		   Set<Long> set=	TservicesAction.lockMap.keySet();
             for(Long l:set){
            	 TservicesAction.LockObject o= (TservicesAction.LockObject)(TservicesAction.lockMap.get(l));
            	 if(System.currentTimeMillis()- o.getTime()>30000){
            		 synchronized (o) {
            				o.notify();
            			} 
            	 }
             }
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();

			}
		}
	}
}
